package locations.actions;

import java.util.ArrayList;
import java.util.List;
import com.opensymphony.xwork2.ActionSupport;
import locations.dao.implement.ServicioDAOHibernateJPA;
import locations.model.Servicio;

public class ServiceIndexAction extends ActionSupport
{
	private String pageTitle = "Listado de servicios";
	private List<Servicio> services = new ArrayList();
	
	public String execute() throws Exception
        {
		ServicioDAOHibernateJPA dao = new ServicioDAOHibernateJPA();
		this.setServices(dao.retrieveAll());
		return SUCCESS;
	}

	public String getPageTitle()
        {
		return pageTitle;
	}

	public void setPageTitle(String pageTitle)
        {
		this.pageTitle = pageTitle;
	}

	public List<Servicio> getServices()
        {
		return services;
	}

	public void setServices(List<Servicio> services)
        {
		this.services = services;
	}


	
	
	
}
